home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / games / IndiZone / gold / usClass.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  2.1 KB  |  72 lines

  1. /*
  2.  * The original copyright owners of the accompanying source code files have
  3.  * agreed to place such code into the public domain.  Accordingly, anyone
  4.  * who receives or obtains a copy of such source code is freely entitled to
  5.  * reproduce, use and otherwise exploit such code (including the right to
  6.  * make derivative works), at his/her own risk and expense, without any
  7.  * obligation or liability to the original copyright owners.
  8.  *
  9.  * We would appreciate (but do not require) that the following message be
  10.  * included in any derivative works:
  11.  *
  12.  * "Portions of this program were developed by Peter Broadwell, Rob Myers
  13.  * and Robin Schaufler while working in Silicon Valley."
  14.  *
  15.  * The accompanying source code files and related documentation materials
  16.  * are distributed on an "AS IS" basis, without any warranties or
  17.  * guarantees of any kind.  All implied warranties, including the implied
  18.  * warranties of merchantability and of fitness for any particular purpose,
  19.  * are expressly disclaimed.
  20.  */
  21. #include "gl.h"
  22.  
  23. #include "geom.h"
  24. #include "class.h"
  25. #include "classIds.h"
  26. #include "selectors.h"
  27. #include "mbox.h"
  28. #include "individual.h"
  29.  
  30. extern class indivClass;
  31.  
  32. extern char *bselNone(), *eselNone();
  33.  
  34. fcnTable usTable[] = {
  35.     DOIT,       NULL,        /* don't DOIT as a subscribedTo by others */
  36.     SELECT,    NULL,        /* don't conduct individual's hit processing */
  37.     DESELECT,    NULL,
  38.     BEGINSELECT,bselNone,
  39.     ENDSELECT,    eselNone,
  40.     POSTBEHAVE,    NULL,        /* don't post a behavior */
  41.     ADDPANEL,    NULL,        /* don't show a panel */
  42.     EOTABLE,
  43. };
  44.  
  45. class usClass = {
  46.     &indivClass,
  47.     usTable,
  48.     sizeof(individual),
  49.     US,
  50. };
  51.  
  52. individual usTemplate = {
  53.             /*   inst        */
  54.     &usClass,        /* myClass pointer    */
  55.     NULL,        /* classFunctions     */
  56.     0,            /* nFunctions        */
  57.             /*   mailbox        */
  58.     NULL,        /* subscribers          */
  59.     NULL,        /* subscribedTo         */
  60.                 /*   individual         */
  61.     {0,0,0},        /* position        */
  62.     {0,0,0},        /* lastPosition        */
  63.     {1,0,0},        /* delta        */
  64.     {0,0,0},        /* velocity        */
  65.     {0,0,0},        /* avelocity        */
  66.     {0,0,0},        /* acceleration        */
  67.     NULL,        /* model        */
  68.     NULL,        /* flags        */
  69.     NULL,        /* curVars        */
  70. };
  71.  
  72.